import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
//布局（不动）
import Layout from '../views/Layout.vue'
//我的个人中心
import My from '../views/My.vue'
import Mytousu from '../views/user/mytousu.vue'//我的投诉
import Seekadvice from '../views/user/seekadvice.vue'//咨询

//留言
import Feedback from '../views/feedback.vue'
//首页
import Home from '../views/Home.vue'
//投诉
import Complain from '../views/complain.vue'

const router = createRouter({
	history: createWebHashHistory(
		import.meta.env.BASE_URL),
	routes: [
		{
			path: '/',
			name: 'layout',
			component: Layout,
			redirect: '/home',
			children: [{
				path: '/home',
				name: 'home',
				component: Home
			},
			{
				path: '/complain',
				name: 'complain',
				component: Complain
			},
			{
				path: '/my',
				name: 'my',
				component: My
			},
			{
				path: '/feedback',
				name: 'feedback',
				component: Feedback
			},
			]
		},
		{
			path: '/mytousu',
			name: 'mytousu',
			component: Mytousu
		},
		{
			path: '/seekadvice',
			name: 'seekadvice',
			component: Seekadvice
		},
	]
})

export default router
